/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.stemaini.utility;

import java.util.List;
import javax.swing.table.AbstractTableModel;

/**
 *
 * @author Administrator
 */
public class TableModelStopWord extends AbstractTableModel {

    private List<StopWord> list;

    public TableModelStopWord(List<StopWord> list) {
        this.list = list;
    }

    public int getRowCount() {
        return list.size();
    }

    public int getColumnCount() {
        return 1;
    }

    public Object getValueAt(int rowIndex, int columnIndex) {
        switch(columnIndex){
            case 0:
                return list.get(rowIndex).getStopword();
            default:
                return null;
        }
    }

    @Override
    public String getColumnName(int column) {
        switch(column){
            case 0:
                return "stopword";
            default:
                return null;

        }
    }


}

